Fixed login method so it doesn't add non-existent users