Use $http promise to check if user is logged in

Solves async problem if access token is expired