Fixed login $state change, added better $http and $sailSocket error handling.