fixed tests to work properly when needing to login