Added user authentication library and modified some methods