Added a test case that verifies the correct user is used.
The test creates a user with only the client ip as allowed host and then uses that client to log in.