Some login handling updates