IOS - Implemented session login, and fixed some login bugs.