removed window.setTimeout
small cleanup
cleanup login -view and -template