fixed login and logout scripts, comments and error messages