clean up sign in code in controller