wrote unit tests for authentication and absorbed gaias new designs