Resolved admin login bug

Added integration test to prove that the bug is fixed.