Cleaner way to check for successful login

The commits need to be merged in order to get a successful build, don't know how to :/