Pass the right variable to the alert box
Extract login effects to their own methods
Abstract out setting the current user