SQL Server #Error 15434 occurs when a login has made a connection to the #SQL Server Instance and you are trying to drop the same login.
Solution to fix this issue is to close all sessions which are opened by this login and then drop it.
https://ibmimedia.com/blog/58/solve-sql-server-error-15434