Fix bug of accessing not logged user to edit profile. Closes #56