added login activity and save login into preferences when it's ok