added some main fuction functionality
logging and logging out works!!