Added function requireLogin()

Redirects to login.php. After a successful login, user is redirected to
the page that sent him to login
Error handling at changepass and deleteacc