added logut function to the authfactory
added a function that checks if the user is authenticated by the server or not
added run block to my main.js