write high level function for sessionLogin