Session - timeout; Login - removed redundant code

Timeout is now implemented for sessions, so a user will be logged out
automatically after 20 minutes. In combination with the refresh
attribute added to the header, this will stop users from staying idle.
Also removed some redundant table closure code in login.php - this was
erroneous as the table had already been closed.