Added user functionality and log in and out