Fixed email bug if user wasn't logged in