Removed unnecessary globals
Renamed methods, added destroy()
Renaming view
Call logout from form(), and added comments