Starting logging activity.
Added loggedIn variable and function.