removed unused code in login method