add group to login method, code for #7

add group to login method, code for #7