fixed bug in angular controller and session create