Validations were added. Also some modifications for OAuth implementation