Fixed a bug causing an exception to be thrown during failed logins.

BUG:
The intended behaviour of a failed login is for the authenticateStudent()
function to return false so that an equality check in the LoginScreen
will catch the submissions of wrong credentials.

However, submissions of incorrect credentials were causing an uncaught
exception to be thrown instead.

FIX:
There were two subtle errors that caused this bug.

session.close() was called when an AuthenticationException  was caught.
This causes an invocation error as the session had already been closed
previously. This is fixed by removing the extra session.close() call.

Submitting a non-existent username causes a query to return a null Student
object. This is fixed by adding a if/else check for null Student objects
before attempting to authenticate.