Updated login error handling.

The login function was only checking for `data` being returned rather than whether an error occurred. Because errors are returned as part of the response object, the check for `data` would never fail allowing the code to attempt to use the API even after a failed login attempt.

This update checks for an error from the Nest API and returns the error using the callback function.

Thanks for a sweet Nest API module <3