Updated the login part. Still need to update cookies.