Putting block outside a method is not a good practice. Blocks in Objc are objects. If you create an object outside of the method ARC doesn't know when to release it and it means that you allocated an object which will live there for as long as app runs. Obviously, you don't need login handler after you logged in. 

So put it in method, inline.