Login with username, password and session length
You can simply show message to the user using javascript method for example:p_web.Script('alert(''xxx'');') where xxx is the string which You want to show to the user.