Added another exported test. Extracted login routine in a seperate function.