Added login, signup and logout functions