added logout
persistant login
new refactoring