Cleaned up the code, and added an OnReceiveFailure method to the OnReceiveListener.
Fixed some issues regarding orientation change when logging in.
Fixed merge conflict when pulling develop.