fixing login method