Completed login and added logout.