Impruve login and logout functions and rename message controllers