fixed bug if not logged in when pressing Edit